﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowLeaveInfoList.aspx.cs"
    Inherits="leaderManager_ShowLeaveInfoList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>
    <style type="text/css">
<!--
html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
-->
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="sub_right_top">
        <div class="hdm_header">
            <div class="tb1_on">
                <h2 class="h2_icon">
                    请假查询</h2>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="hdm_footer">
            <div style="height: 17px;">
            </div>
            <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="60">
                        员工姓名：
                    </td>
                    <td>
                        <asp:TextBox ID="txtLeaveUser" runat="server" Height="16px" Width="227px" ReadOnly="true"></asp:TextBox>
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/selectstuff.gif"
                            OnClientClick="val = window.showModalDialog ('../admin/SelectUserLeft.aspx', '','status:no;center:yes;scroll:no;resizable:no;help:no;dialogWidth:550px;dialogHeight:400px');document.getElementById('txtLeaveUser').value = val[1];document.getElementById('hidUserId').value = val[0];return false;"
                            ToolTip="选择员工" />
                        <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/clearstuff.gif"
                            OnClientClick="document.getElementById('txtLeaveUser').value='';document.getElementById('hidUserId').value='';return false;"
                            ToolTip="清除" />
                    </td>
                    <td width="60">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td width="60">
                        起始日期：
                    </td>
                    <td width="240">
                        <asp:TextBox ID="txtBeginDate" runat="server" CssClass="Wdate" onClick="WdatePicker()"
                            Height="16px" Width="227px"></asp:TextBox>
                    </td>
                    <td width="60">
                        终止日期：
                    </td>
                    <td width="60">
                        <asp:TextBox ID="txtEndDate" runat="server" CssClass="Wdate" onClick="WdatePicker()"
                            Height="16px" Width="207px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/images/reach_button.gif"
                            OnClick="ImageButton3_Click" />
                    </td>
                </tr>
            </table>
            <br />
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                BorderColor="#77ACD0" HorizontalAlign="Center" BorderWidth="1px" CellPadding="3"
                GridLines="Horizontal" EmptyDataText="没有找到符合的数据！" OnPageIndexChanging="GridView1_PageIndexChanging"
                OnRowCommand="GridView1_RowCommand" Width="99%">
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <Columns>
                    <asp:BoundField DataField="LeaveInfoId" HeaderText="序号">
                        <HeaderStyle CssClass="itemhead" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="登记人">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("LeaveUser.UserName") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="itemhead" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="登记日期">
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Convert.ToDateTime(Eval("Register")).ToShortDateString() %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="itemhead" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="开始日期">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Convert.ToDateTime(Eval("BeginDate")).ToShortDateString()%>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="itemhead" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="终止日期">
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" Text='<%# Convert.ToDateTime(Eval("EndDate")).ToShortDateString() %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="itemhead" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="请假原因">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Convert.ToString(Eval("LeaveRemark")).Length>20?Convert.ToString(Eval("LeaveRemark")).Substring(0,20):Eval("LeaveRemark") %>'
                                CommandArgument='<%# Eval("LeaveInfoId") %>' CommandName="leaveInfo"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="itemhead" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument='<%# Eval("LeaveInfoId") %>'
                                CommandName="updateState" Text='<%# Convert.ToInt32(Eval("State"))==1?"批准":"未批准" %>'
                                OnClientClick="return confirm('确认批准么？')"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="itemhead" />
                    </asp:TemplateField>
                </Columns>
                <RowStyle BackColor="Transparent" ForeColor="Black" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                <PagerStyle BackColor="#E4F1FD" ForeColor="#1E5494" HorizontalAlign="Right" />
                <HeaderStyle BackColor="#E4F1FD" ForeColor="#1E5494" BorderColor="#77ACD0" HorizontalAlign="Center" />
                <AlternatingRowStyle BackColor="#E4F1FD" />
            </asp:GridView>
        </div>
    </div>
    <asp:HiddenField ID="hidUserId" runat="server" />
    </form>
</body>
</html>
